/*
   @Copyright:LeetCode
   @Author:   tjyemail
   @Problem:  http://leetcode.com/problems/palindrome-number
   @Language: C++
   @Datetime: 19-05-22 10:33
   */

class Solution {
public:
	bool isPalindrome(int x) {
		char str[32];
		sprintf(str,"%d",x);
		for(int i=0, j=strlen(str)-1; i<j; ++i, --j)
			if(str[i]!=str[j]) return false;
		return true;
	}
};
